<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true"   layout="table" action="userScoreController.do?doUpdate" tiptype="3" >
  		<input type="hidden" name="id" value="${user.id}" />
		<table style="" cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							姓名:
						</label>
					</td>
					<td class="value">
					   ${user.realName }(${user.staffNo})
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							选择扣分规则:
						</label>
					</td>
					<td class="value">
						<t:CommonSelect url="scoreManuRuleController.do?select" name="ruleId" textField="title"
						 idField="id" callback="ruleLoaded" dataAttrs="score"></t:CommonSelect>
						<span class="Validform_checktip"></span> 
						<label class="Validform_label"	style="display: none;">扣分规则</label>	
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							扣除分数:
						</label>
					</td>
					<td class="value" id="scoreTD">
						 
					</td>
				</tr>
				
			</table>
		</t:formvalid>
		
		<script>
			$('#ruleId').change(function(){
				ruleLoaded();
			});
		
			function ruleLoaded(){
 				var score = $('#ruleId').find("option:selected").attr("data-score");
				$('#scoreTD').html(score);
			}
		</script>
		
 </body>
